﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Odbc;

namespace WebApplication1
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
                           "SERVER=192.168.1.222;" +
                           "PORT=3308;" +
                           "DATABASE=bvtest;" +
                           "UID=root;" +
                           "PASSWORD=1234;" +
                           "OPTION=3";
            OdbcConnection MyConnection = new OdbcConnection(MyConString);
            MyConnection.Open();
            OdbcCommand MyCommand = new OdbcCommand("SELECT patientName FROM patient", MyConnection);
            OdbcDataReader MyDataReader;
        MyDataReader = MyCommand.ExecuteReader();
     while (MyDataReader.Read())
     {
         Label1.Text = MyDataReader.GetString(0).ToString();
     }
           
        
        }
    }
}
